<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>小当家商城</title>
    <link rel="stylesheet" href="/static/mall/css/swiper-bundle.min.css">
    <link rel="stylesheet" href="/static/mall/css/iconfont.css">
    <link rel="stylesheet" href="/static/mall/css/common.css">
    <link rel="stylesheet" href="/static/mall/styles/header.css">
    <link rel="stylesheet" href="/static/sweetalert/sweetalert.css"/>
    <meta name="keywords" content="小当家商城" />
    <meta name="description" content="xdjmall项目（小当家商城）是一套电商系统，包括 小当家商城系统及 小当家管理员系统"/>
</head>
<nav id="nav">
    <div class="banner_x center">
        <a href="/xdjmall/index" class="logo"><h1>山服商城</h1></a>
        <div class="fr">
            <div class="search">
                <input class="text" type="text" id="keyword" autocomplete="off">
                <div class="search_hot">
                </div>
            </div>
            <div class="button iconfont icon-search" onclick="search()"></div>
        </div>
    </div>
</nav>
<header id="header">
    <div class="center">
        <ul class="fl">
            <li><a href="/xdjmall/index">小当家商城</a></li>
            <li><a href="/xdjmall/admin">后台管理系统</a></li>
        </ul>
        <div class="fr">
            <th:block th:unless="${session.loginUser==null}">
            
                <div class="user">
                    <ul class="selector">
                        <li>
                            <a th:href="@{/personal}">
                                个人中心
                            </a>
                        </li>
                        <li>
                            <a th:href="@{/orders}">
                                我的订单
                            </a>
                        </li>
                        <li>
                            <a th:href="@{/logout}">
                                退出登录
                            </a>
                        </li>
                    </ul>
                    <a href="##" class="username">
                        <th:block th:text="${session.loginUser.nickName}"></th:block>
                        <i class="iconfont icon-down"></i>
                    </a>
                </div>
                <div class="shopcart">
                    <a th:href="@{/shop-cart}" style="color: white;"><i class="iconfont icon-cart"></i>
                        购物车(
                        <th:block th:text="${session.loginUser.shopCartItemCount}"></th:block>
                        )</a>
                </div>
            </th:block>
            <th:block th:if="${session.loginUser==null}">
                <ul class="login">
                    <li><a th:href="@{/login}">登录</a></li>
                    <li><a th:href="@{/register}">注册</a></li>
                </ul>
                <div class="shopcart">
                    <a href="##" style="color: white;"><i class="iconfont icon-cart"></i>
                        购物车(0)</a>
                </div>
            </th:block>
        </div>
    </div>
</header>
</html>
